package com.kwlt.smc.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.kwlt.smc.entity.Blacklist;

/**
 *黑名单dao类
 * @author wangweiheng
 *
 */
public interface BlacklistDao extends JpaRepository<Blacklist, Long> {
	
	
	@Query("select b from Blacklist b where b.level='1' and b.status!='X'")
	List<Blacklist> findGlobalBlacklist();
	
	@Query("select b from Blacklist b where b.status!='X' order by b.type, b.level,b.source,b.operators,b.channelCode,b.userCode ")
	List<Blacklist> findAllBlacklist();
}
